package o;

import java.io.IOException;
import java.lang.reflect.Type;
import java.util.Collection;

public final class aug implements ats {
    private final atv ˎ;

    static final class b<E> extends ato<Collection<E>> {
        private final aua<? extends Collection<E>> ˊ;
        private final ato<E> ˎ;

        public /* synthetic */ void ˎ(aux o_aux, Object obj) throws IOException {
            ॱ(o_aux, (Collection) obj);
        }

        public /* synthetic */ Object ˏ(auy o_auy) throws IOException {
            return ˎ(o_auy);
        }

        public b(atb o_atb, Type type, ato<E> o_ato_E, aua<? extends Collection<E>> o_aua__extends_java_util_Collection_E) {
            this.ˎ = new auo(o_atb, o_ato_E, type);
            this.ˊ = o_aua__extends_java_util_Collection_E;
        }

        public Collection<E> ˎ(auy o_auy) throws IOException {
            if (o_auy.ʻ() == auz.NULL) {
                o_auy.ॱॱ();
                return null;
            }
            Collection<E> collection = (Collection) this.ˊ.ˋ();
            o_auy.ˊ();
            while (o_auy.ˋ()) {
                collection.add(this.ˎ.ˏ(o_auy));
            }
            o_auy.ˎ();
            return collection;
        }

        public void ॱ(aux o_aux, Collection<E> collection) throws IOException {
            if (collection == null) {
                o_aux.ᐝ();
                return;
            }
            o_aux.ˎ();
            for (E ˎ : collection) {
                this.ˎ.ˎ(o_aux, ˎ);
            }
            o_aux.ॱ();
        }
    }

    public aug(atv o_atv) {
        this.ˎ = o_atv;
    }

    public <T> ato<T> ˎ(atb o_atb, auv<T> o_auv_T) {
        Type ˏ = o_auv_T.ˏ();
        Class ˋ = o_auv_T.ˋ();
        if (!Collection.class.isAssignableFrom(ˋ)) {
            return null;
        }
        Type ˎ = atp.ˎ(ˏ, ˋ);
        return new b(o_atb, ˎ, o_atb.ˏ(auv.ˋ(ˎ)), this.ˎ.ˎ((auv) o_auv_T));
    }
}
